package com.jerry.springcloudalibaba.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.jerry.springcloudalibaba.entity.CommonResult;

public class MyBlockHandler {

    public static CommonResult handlerException(BlockException exception) {
        return new CommonResult(444, "自定义限流处理信息 ===== "+exception.getClass().getCanonicalName());
    }

    public static CommonResult handlerException(Long id, BlockException exception) {
        return new CommonResult(444, "带id的自定义限流处理信息 ===== "+exception.getClass().getCanonicalName());
    }

}
